package com.sw.receiver;

import com.sw.pojo.BlockInfo2;

@FunctionalInterface
public interface Receiver {

    public void receive(BlockInfo2 blockInfo2);


//    public void receive2(TransactionInfo transactionInfo);

//    @Data
//    @Accessors(chain = true)
//    public class BlockInfo{
//        private Integer id;
//        private BigInteger number;
//        private String hash;
//        private String parentHash;
//        private String miner;
//        private BigInteger difficulty;
//        private BigInteger size;
//        private BigInteger gasLimit;
//        private BigInteger gasUsed;
//        private BigInteger timestamp;
//        private List<TransactionInfo> txs;
//
//
//        public void setTxs(List<EthBlock.TransactionResult> transactions) {
//            for (EthBlock.TransactionResult transactionResult : transactions){
//                txs.add((TransactionInfo) transactionResult);
//            }
//        }
//    }
//
//
//    @Data
//    @Accessors(chain = true)
//    public static class TransactionInfo{
//        private Integer id;
//        private String hash;
//        private String blockHash;
//        private BigInteger blockNumber;
//        private String fromAddr;
//        private String toAddr;
//        private BigInteger value;
//        private BigInteger gasPrice;
//        private BigInteger gas;
//        private BigInteger gasUsed;
//    }
}


